<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=0, viewport-fit=cover" />
	<title>原生</title>
</head>
<body>
<script>

// console.log(
// 	new Promise((resolve, reject) => {
// 		console.log(`constructor---`)
// 		setTimeout(() => {
// 			reject(1);
// 		}, 2000)
// 	}).then(
// 		res => { console.log(`res---`, res) },
// 		err => {
// 			console.log(`err---`, err)
// 			return 2
// 		}
// 	).then(
// 		res => { console.log(`输出`, res) },
// 		() => { console.log(`报错`) }
// 	)
// )

console.log(
	new Promise((resolve, reject) => {
		resolve(1)
		reject(2)
	})
)


</script>
</body>
</html>
